
from django.core.management.base import NoArgsCommand

import os
import sys

class Command(NoArgsCommand):
    def handle_noargs(self, **options):
        from django.core.management import call_command
        fname = os.path.join(os.path.dirname(__file__),os.pardir,os.pardir,'fixtures','initial_data.json')
        sys.stdout = open(fname, 'w')
        call_command('dumpdata', 'testapp', 'auth.user', 'sites',indent=3)